import java.io.IOException;
import java.io.UnsupportedEncodingException;

import org.apache.http.HttpException;

import whatHandlers.whatCDLogin;
import whatHandlers.whatStatsRegex;

public class Main {

	/**
	 * @param args
	 * @throws UnsupportedEncodingException
	 * @throws IOException
	 * @throws HttpException
	 */
	static String TestStatsRegex = "			<div class=\"head colhead_dark\">Stats</div> "
			+ "	<ul class=\"stats nobullet\"> "
			+ "		<li>Joined: <span title=\"Jun 26 2009, 06:13\">8 months, 4 days ago</span></li> "
			+ "		<li>Last Seen: <span title=\"Feb 28 2010, 22:50\">6 mins ago</span></li> "
			+ "		<li>Uploaded: 15.31 GB</li> "
			+ "		<li>Downloaded: 1.13 GB</li> "
			+ "		<li>Ratio: <span class=\"r50\">13.50</span></li> "
			+ "		<li>Required ratio: 0.00</li> " + "	</ul> ";

	static String[] LoginArray = { "https://ssl.what.cd/login.php",
			"USERNAME", "PASSWORD" };

	public static void main(String[] args) throws UnsupportedEncodingException {
		whatCDLogin WCL = new whatCDLogin(LoginArray);
		whatStatsRegex WSR = new whatStatsRegex();

		/*
		System.out.println(WSR.FindUploadedString(TestStatsRegex));
		System.out.println(WSR.FindDownloadedString(TestStatsRegex));
		System.out.println(WSR.FindReqRatioString(TestStatsRegex));
		*/
		
		
		// To do a login, uncomment the below, and set the username/password in the array.
		WCL.loginPOST();

	}

}
